package pt.iscte.pcd.avioes;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.Observer;

import javax.swing.JFrame;

public class DrawApp {
	private static final int NUN_LIN = 10;
	private static final int NUM_COL = 20;
	private JFrame frame = new JFrame("Draw");
	private Board quadro = new Board(NUN_LIN, NUM_COL);

	public DrawApp() {
		frame.getContentPane().add(quadro);
		quadro.addMouseListener(new MouseListener() {

			@Override
			public void mouseReleased(MouseEvent e) {
				// quadro.setFin(e.getPoint());

			}

			@Override
			public void mousePressed(MouseEvent e) {
				// quadro.setInit(e.getPoint());

			}

			@Override
			public void mouseExited(MouseEvent arg0) {
				// TODO Auto-generated method stub

			}

			@Override
			public void mouseEntered(MouseEvent arg0) {
				// TODO Auto-generated method stub

			}

			@Override
			public void mouseClicked(MouseEvent e) {
			//	quadro.setSelected(e.getPoint());
			}
		});

		frame.setSize(600, 305);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}

	public void execute() {
		frame.setVisible(true);
	}

	public Board getBoard() {
		return quadro;
	}

}